<template>
  <view class="myInfoContainer">
    <cunstom_navigation_bar :title="`个人信息`" :tapEvent="goback" :propStyles="propStyles"></cunstom_navigation_bar>
    <view class="infoType">
      <view :class="selectedIndex==0?'selected type':'type'" @tap="selectedIndex=0">商城订单</view>
      <view :class="selectedIndex==1?'selected type':'type'" @tap="selectedIndex=1">职业履历</view>
      <view :class="selectedIndex==2?'selected type':'type'" @tap="selectedIndex=2">服务信息</view>
      <view :class="selectedIndex==3?'selected type':'type'" @tap="selectedIndex=3">我的菜系</view>
    </view>
    <view class="infoBox">

      <view class="content1" v-if="selectedIndex==0">
        <view class="part1">
          <view class="title">实名认证</view>

          <view class="legalIdBox">
            <view class="uploadView front" @tap="uploadImage('legalIdCardPicF')">
              <image :src="legalImgSrcF"></image>

            </view>
            <view class="uploadView back" @tap="uploadImage('legalIdCardPicB')">
              <image :src="legalImgSrcB"></image>

            </view>

          </view>

        </view>
        <view class="part2">
          <uni-forms label-position="top" ref="form1" :modelValue="formData1" :rules="rules1">
            <uni-forms-item label="真实姓名" name="name" required="true" label-width="80">
              <uni-easyinput type="text" v-model="formData1.name" placeholder="王" />
            </uni-forms-item>
            <uni-forms-item label="出生日期" name="birthday" label-width="80" required="true">

              <uni-datetime-picker type="date" :clear-icon="false" v-model="formData1.birthday" @change="changeFun" />

            </uni-forms-item>
            <uni-forms-item label="展示昵称" name="name" required="true" label-width="80">
              <uni-easyinput type="text" v-model="formData1.nickname" placeholder="王" />
            </uni-forms-item>
            <uni-forms-item label="性别" name="sex" required="true" label-width="80">

              <radio-group @change="radioChangeSex" v-model="formData1.sex">
                <label class="uni-list-cell uni-list-cell-pd">
                  <view>
                    <radio value="1" color="#FECF01" :checked="formData1.sex === '1'" />
                  </view>
                  <view>男</view>
                </label>
                <label class="uni-list-cell uni-list-cell-pd">
                  <view>
                    <radio value="0" color="#FECF01" :checked="formData1.sex === '0' " />
                  </view>
                  <view>女</view>
                </label>
              </radio-group>
            </uni-forms-item>
            <uni-forms-item label="手机" name="phone" label-width="80" required="true">
              <uni-easyinput type="text" v-model="formData1.phone" placeholder="189****0097" />
            </uni-forms-item>
            <uni-forms-item label="常住地址" name="address" label-width="80" required="true">
              <uni-easyinput type="textarea" v-model="formData1.address" placeholder="苏州工业园区金湖湾花园"
                :inputBorder="true" />
            </uni-forms-item>
            <view class="avatarBox">
              <uni-forms-item label="常形象照" name="avatar" label-width="80" required="true">
                <view class="uploadAvatar" @tap="uploadImage('avatarSrc')">
                  <image class="avatar" :src="avatarSrc" mode="widthFix"></image>

                </view>
              </uni-forms-item>
              <view class="example">
                <view class="title">例图</view>
                <image src="https://visionmpapi.jiuerjindi.com/upload/mp/registerCook/example.png" mode="widthFix">
                </image> 
              </view>
            </view>

          </uni-forms>
        </view> 



        <button @click="nextStep" class="nextStep">保存</button>
      </view>
      <view class="content2" v-if="selectedIndex==1">
        <view class="part1">

          <uni-forms label-position="top" ref="form2" :modelValue="formData2" :rules="rules2">
            <view class="title">职业信息</view>
            <uni-forms-item label="职业状态" name="job_status" required="true" label-width="80">
              <!-- '工作状态 0在职 1离职 2开店 3自由'   -->
              <radio-group @change="radioChangeJob"  v-model="formData2.job_status">
                <label class="uni-list-cell uni-list-cell-pd-1">
                  <view>
                    <radio value="0" color="#FECF01" :checked="formData2.job_status === '0'" />
                  </view>
                  <view>在职</view>
                </label>
                <label class="uni-list-cell uni-list-cell-pd-1">
                  <view>
                    <radio value="1" color="#FECF01" :checked="formData2.job_status === '1' " />
                  </view>
                  <view>离职</view>
                </label>
                <label class="uni-list-cell uni-list-cell-pd-1">
                  <view>
                    <radio value="2" color="#FECF01" :checked="formData2.job_status === '2' " />
                  </view>
                  <view>开店</view>
                </label>
                <label class="uni-list-cell uni-list-cell-pd-1">
                  <view>
                    <radio value="3" color="#FECF01" :checked="formData2.job_status === '3' " />
                  </view>
                  <view>自由</view>
                </label>
              </radio-group>
            </uni-forms-item>
            <uni-forms-item label="职业履历" name="job_desc" label-width="80" required="true">
              <uni-easyinput type="textarea" v-model="formData2.job_desc" placeholder="请输入职业履历，若无请填写自由职业，最多五十字以内"
                :inputBorder="true" />
            </uni-forms-item>
            <uni-forms-item label="厨龄（年）：" name="cook_age" required="true" label-width="80">
              <uni-easyinput type="text" v-model="formData2.cook_age" placeholder="王" />
            </uni-forms-item>


          </uni-forms>
        </view>
        <view class="part2">
          <uni-forms label-position="top" ref="form3" :modelValue="formData3" :rules="rules3">
            <view class="title">健康证</view>
            <uni-forms-item label="过期时间" name="guoqishijian" label-width="80" required="true">

              <uni-datetime-picker type="date" :clear-icon="false" v-model="formData3.guoqishijian"
                @change="changeFun" />

            </uni-forms-item>

            <view class="healthBox">
              <uni-forms-item label="健康证" name="healthSrc" label-width="80" required="true">
                <view class="uploadHealth" @tap="uploadImage('healthSrc')">
                  <image class="health" :src="healthSrc" mode="widthFix"></image>

                </view>
              </uni-forms-item>

            </view>
          </uni-forms>
        </view>
        <view class="part3">
          <uni-forms label-position="top" ref="form4" :modelValue="formData4" :rules="rules4">
            <view class="title">执业资格证</view>
            <uni-forms-item label="资格证类型" name="zigezheng" required="true" label-width="80">
              <uni-data-select v-model="formData4.zigezheng" :localdata="rangeProperty"></uni-data-select>
            </uni-forms-item>
            <uni-forms-item label="执业资格证照片" name="achieveImgs" required="true" label-width="80">
              <uni-file-picker v-model="formData4.achieveImgs" limit="10" file-mediatype="image" :auto-upload="false"
                @select="selectFileAchieve($event)" @delete="deleteFileAchieve($event)">
              </uni-file-picker>
            </uni-forms-item>


          </uni-forms>
        </view>
        <view class="part4">
          <uni-forms label-position="top" ref="form5" :modelValue="formData5" :rules="rules5">
            <view class="title">所获荣誉</view>
            <uni-forms-item label="荣誉名称:" name="rongyumingcheng" label-width="80" required="true">
              <uni-easyinput type="textarea" v-model="formData5.rongyumingcheng" placeholder="无" :inputBorder="true" />
            </uni-forms-item>
          </uni-forms>
        </view>
        <button @click="nextStep" class="nextStep">保存</button>
      </view>

      <view class="content3" v-if="selectedIndex==2">
        <view class="part1">

          <uni-forms label-position="top" ref="form6" :modelValue="formData6" :rules="rules6">
            <view class="title">职业信息</view>
            <uni-forms-item label="目前服务费" name="fee" required="true" label-width="80">
              <uni-easyinput type="text" v-model="formData6.fee" placeholder="200.00" />
            </uni-forms-item>
            <uni-forms-item label="是否清洁" name="has_clean" required="true" label-width="80">

              <radio-group @change="radioChangeClean" v-model="formData6.has_clean">
                <label class="uni-list-cell uni-list-cell-pd-1">
                  <view>
                    <radio value="1" color="#FECF01"   :checked="formData6.has_clean === '1'"/>
                  </view>
                  <view>是</view>
                </label>
                <label class="uni-list-cell uni-list-cell-pd-1">
                  <view>
                    <radio value="0" color="#FECF01"  :checked="formData6.has_clean === '0' "/>
                  </view>
                  <view>否</view>
                </label>


              </radio-group>
			  
            </uni-forms-item>
            <uni-forms-item label="是否有服务员" name="has_waiter" required="true" label-width="80">

              <radio-group @change="radioChangeWaiter" v-model="formData6.has_waiter">
                <label class="uni-list-cell uni-list-cell-pd-1">
                  <view>
                    <radio value="1" color="#FECF01" :checked="formData6.has_waiter === '1'" />
                  </view>
                  <view>是</view>
                </label>
                <label class="uni-list-cell uni-list-cell-pd-1">
                  <view>
                    <radio value="0" color="#FECF01" :checked="formData6.has_waiter === '0' " />
                  </view>
                  <view>否</view>
                </label>


              </radio-group>
            </uni-forms-item>
            <uni-forms-item label="能否提供配套用具（可多选）：" name="has_cooker" label-width="80">
              <view>
                <checkbox-group @change="checkboxChangeCooker">
                  <label>
                    <checkbox value="canju" :checked="formData6.has_cooker.includes('canju')" color="#FECF01" style="transform:scale(0.7)" />餐具
                  </label>
                  <label>
                    <checkbox value="chuju" :checked="formData6.has_cooker.includes('chuju')" color="#FECF01" style="transform:scale(0.7)" />厨具
                  </label>
                </checkbox-group>
              </view>
            </uni-forms-item>
            <uni-forms-item label="是否提供发票" name="has_invoice" required="true" label-width="80">

              <radio-group @change="radioChangeInvoice"  v-model="formData6.has_invoice">
                <label class="uni-list-cell uni-list-cell-pd-1">
                  <view>
                    <radio value="1" color="#FECF01" :checked="current === 1" />
                  </view>
                  <view>是</view>
                </label>
                <label class="uni-list-cell uni-list-cell-pd-1">
                  <view>
                    <radio value="0" color="#FECF01" :checked="current === 0 " />
                  </view>
                  <view>否</view>
                </label>


              </radio-group>
            </uni-forms-item>


          </uni-forms>
        </view>
        <button @click="nextStep" class="nextStep">保存</button>
      </view>
      <view class="content4" v-if="selectedIndex==3">
        <view class="part1">

          <uni-forms label-position="top" ref="form7" :modelValue="formData7" :rules="rules7">
            <view class="title">职业信息</view>
            <uni-forms-item label="菜系：" name="cuisine_ids" label-width="80">
              <view>
                <checkbox-group @change="checkboxChangeCuisine">
                  <label class="caixiLabel" v-for="(item,index) in cuisineList">
                    <checkbox :value="item.id" :checked="formData7.cuisine_ids.includes(item.id)" color="#FECF01"
                      style="transform:scale(0.7)" />{{item.name}}
                  </label>

                </checkbox-group>
              </view>
            </uni-forms-item>
           


          </uni-forms>
        </view>
        <view class="part2">
          <view class="title">职业信息</view>
          <uni-forms label-position="top" ref="form8" :modelValue="formData8" :rules="rules8">
            <uni-file-picker v-model="formData8.images" limit="10" file-mediatype="image" :auto-upload="false"
              @select="selectFileAchieve1($event)" @delete="deleteFileAchieve($event)">
            </uni-file-picker>
        </uni-forms>
        </view>
        <button @click="nextStep" class="nextStep">保存</button>
      </view>

      <!-- <view class="image-body image-box">
          <view class="image-text">相关证书<span class="gray">支持.jpg/png
              格式</span></view>
          <uni-file-picker v-model="formData3.achieveImgs" limit="10" file-mediatype="image" :auto-upload="false"
            @select="selectFileAchieve($event)" @delete="deleteFileAchieve($event)">
          </uni-file-picker>
        </view> -->

      <!-- <view class="image-body image-box">
          <view class="image-text"><span class="redStar">*</span>本人照片<span class="gray">支持.jpg/png
              格式</span></view>
          <uni-file-picker v-model="formData3.photoImgs" limit="1" file-mediatype="image" :auto-upload="false"
            @select="selectFilePhoto($event)" @delete="deleteFilePhoto($event)">
          </uni-file-picker>
        </view> -->

    </view>
    <view class="zhanwei"></view>
  </view>
</template>

<script>
  const util = require("@/utils/util.js");
  const api = require("@/utils/api.js");
  const app = getApp();
  export default {
    data() {
      return {
        avatarSrc: 'https://visionmpapi.jiuerjindi.com/upload/mp/registerCook/avatarSrc.png',
        healthSrc: 'https://visionmpapi.jiuerjindi.com/upload/mp/registerCook/avatarSrc.png',
        current: 0,
        value: '1',
        selectedIndex: 0,
        rangeProperty: [
          { value: 10101, text: "国家一级厨师" },
          { value: 10102, text: "国家特级厨师" },
          { value: 10103, text: "金牌厨师" },
          { value: 10104, text: "银牌厨师" },
          { value: 10105, text: "铜牌厨师" },
        ],
        cuisineList: [ ],
        imgDomain: "",
        num: 0,
        selectedNum: 0,
        showMask: false, // 擅长领域
        fieldData: [],
        fieldLabel: '',
        fieldValue: '',
        schoolInfo: '',
        canSubmit: false,
        showAchieveMask: false,// 成就
        showPopupSchool: false,
        achieveData: [],
        achieveLabel: '',
        achieveValue: '',
        defaultValue: 3,
        educationData: [],// 学历
        date: this.getDate({
          format: true
        }),
        hasError: false,
        maskHeight: 0,
        maskTop: 0,
        propStyles: {

          iconSrc: "black",
        },
        legalImgSrcF: 'https://visionmpapi.jiuerjindi.com/upload/mp/registerCook/idBack.png',
        legalImgSrcB: 'https://visionmpapi.jiuerjindi.com/upload/mp/registerCook/idFront.png',
        formData1: {
          name: '',
          identityNo: '',
          stageName: '',
          phone: '',
          field: '',
          achieve: '',
          birthday: '',
          nickname: '',
          address: '',
          sex: '0',
          avatar: '',
          show_data: [],
          legalIdCardPic: {
            legalCrtBackImgFilePath: '',
            legalCrtFrontImgFilePath: ''
          },// 校验使用
          identityCardBack: "",
          identityCardFront: "",
        },
        formData2: {
          job_status: '0',
          job_desc: '',
          cook_age: '',
        },
        formData3: {
          guoqishijian: '',
          healthSrc: []
          // educationImgs: [],
          // achieveImgs: [],
          // photoImgs: [],
          // otherAchieve: ''
        },
        formData4: {
          zigezheng: "",
          nature: '',
          achieveImgs: []
        },
        formData5: {
          rongyumingcheng: ''
        },
        formData6: {

          fee: '',
          has_clean: '0',//是否清洁 0不清洁 1清洁
          has_waiter: '0', //有无服务员 0没有 1有
          has_cooker: '0',//可提供厨具 餐具,厨具 逗号分隔
          has_invoice: '0',//提供发票 0不提供 1提供
        },
        formData7: {
          cuisine_ids: ''
        },
        formData8:{
          images:[]
        },
        formSchool1: {
          graduateSchool: '',
          department: '',
          enrollmentTime: '',
          education: '1',
        },
        formSchool2: {
          education: '',
        },
        rules1: {
          name: {
            rules: [{
              required: true,
              errorMessage: " ",
            },
            ],
          },
          identityNo: {
            rules: [{
              required: true,
              errorMessage: " ",
            },
            ],
          },
          legalIdCardPic: {
            rules: [{
              required: true,
              errorMessage: " ",
            }, {
              validateFunction: function (rule, value, data, callback) {

                if (value.legalCrtBackImgFilePath == "" || value.legalCrtFrontImgFilePath == "") {
                  callback('请上传身份证正反面！')
                }
                // return true
              }
            }
            ],
          },
        },
        rules2: {

        },
        rules3: {
          phone: {
            rules: [{
              required: true,
              errorMessage: " ",
            },
            ],
          },
          field: {
            rules: [{
              required: true,
              errorMessage: " ",
            },
            ],
          },

          achieve: {
            rules: [{
              required: true,
              errorMessage: " ",
            },
            ],
          },
          profile: {
            rules: [{
              required: true,
              errorMessage: " ",
            },
            ],
          },


        },
      }
    },
    computed: {
      startDate() {
        return this.getDate('start');
      },
      endDate() {
        return this.getDate('end');
      }
    },
    methods: {
	  changeFun(){
			
	  },
      selectFileAchieve1(chooseImageRes) {

        const tempFilePaths = chooseImageRes.tempFilePaths;
        uni.uploadFile({
          url: process.env.VUE_APP_BASE_URL + api.upload, //后端用于处理图片并返回图片地址的接口   
          filePath: tempFilePaths[0],
          name: 'file',

          success: res => {
            let data = JSON.parse(res.data) //返回的是字符串，需要转成对象格式  
            // data.data.fileName; data.data.url;
            this.formData8.images.push(
              {
                name: data.data.name,
                uuid: data.data.name,
                extname: "jpg",
                cloudPath: data.data.imgPath,
                fileType: "image",
                url: data.data.imgUrl,
                // image: { "width": 580, "height": 773, "location": data.data.url },
                path: data.data.imgUrl, "progress": 0, "status": "ready"
              }
            );
          },
          fail: (err) => {
            console.log("err", err);
          }
        })
      },
      deleteFileAchieve(e) {
        console.log(" e.tempFilePath:" + e.tempFile.name);

      },
      radioChange() {

      },
	  radioChangeSex(event){
		  console.log("----->sex:"+ JSON.stringify(event));
		  this.formData1.sex = event.detail.value;
	  },
	  radioChangeJob(event){
		  this.formData2.job_status = event.detail.value;
	  },
	  radioChangeClean(event){
		  this.formData6.has_clean = event.detail.value;
	  },
	  radioChangeWaiter(event){
		  this.formData6.has_waiter = event.detail.value;
	  },
	  radioChangeInvoice(event){
		  this.formData6.has_invoice = event.detail.value;
	  },
	  
      getTypeTree(e) {
        // console.log('111', e);

      },
      checkboxChange: function (e) {
        console.log(e.detail);

      },
      checkboxChangeCooker: function (e) {
        console.log(e.detail);
		let that = this;
		that.formData6.has_cooker = "";
		if(e.detail.value.length>0){
			e.detail.value.forEach(v=>{
				that.formData6.has_cooker += v+","
			})
		}else{
			that.formData6.has_cooker = "";
		}
        console.log(that.formData6.has_cooker);
      },
      checkboxChangeCuisine: function (e) {
        console.log(e);
		let that = this;
		that.formData7.cuisine_ids = "";
		if(e.detail.value.length>0){
			e.detail.value.forEach(v=>{
				console.log( JSON.stringify(v));
				that.formData7.cuisine_ids += v+","
			})
		}else{
			that.formData7.cuisine_ids = "";
		}
        console.log(that.formData7.cuisine_ids);
      },
	  
      goback() {
        uni.navigateBack()
      },
      uploadImage: function (e) {
        console.log('1111')
        const that = this;
        uni.chooseImage({
          count: 1, //默认9
          sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
          sourceType: ['album', 'camera'], //从相册选择
          success: function (chooseImageRes) {
            console.log('response~~~', chooseImageRes)
            console.log('1->api.upload:', api.upload)
            const tempFilePaths = chooseImageRes.tempFilePaths;
            uni.uploadFile({
              url: process.env.VUE_APP_BASE_URL + api.upload, //后端用于处理图片并返回图片地址的接口   
              filePath: tempFilePaths[0],
              name: 'file',
              success: res => {
                let data = JSON.parse(res.data) //返回的是字符串，需要转成对象格式  

                if (e === "legalIdCardPicF") {//法定代表人正反面
                  that.formData1.identityCardFrontImg = data.data.imgUrl;

                  that.legalImgSrcF = data.data.imgUrl;
                  that.formData1.legalIdCardPic.legalCrtFrontImgFilePath = data.data.imgUrl;


                } else if (e === "legalIdCardPicB") {
                  that.formData1.identityCardBackImg = data.data.imgUrl;

                  that.legalImgSrcB = data.data.imgUrl;
                  that.formData1.legalIdCardPic.legalCrtBackImgFilePath = data.data.imgUrl;
                } else if (e === 'avatarSrc') {
                  that.formData1.avatar = data.data.imgUrl;
                  that.avatarSrc = data.data.imgUrl;
				  console.log("--->res.data:"+ res.data);
                }else if (e === 'healthSrc') {
                  that.formData3.healthSrc = data.data.imgUrl;
                  that.healthSrc = data.data.imgUrl;
                }
              },
              fail: (err) => {
                console.log("err", err);
              }
            })
          },
          fail: function (err) {
            console.log(err)
          }
        });
      },
      async getData() {
        this.fieldData = await util.useDict('artist_skilled_field');
        this.achieveData = await util.useDict('achieve_field');
        let _educationData = await util.useDict('artist_education');

        _educationData.forEach((item) => {
          this.educationData.push(
            { 'value': item.value, 'text': item.label },
          )
        })
        console.log('选择~~', this.educationData)
      },
      // 擅长领域
      showMaskField() {
        this.showMask = !this.showMask;
        console.log(this.fieldData)
        //   if(!this.showMask){
        // this.$refs.popup_field.open('center');
        // this.showMask = true
        //   }
      },
      // 选择擅长领域
      addFieldChecked(index) {

        let cnt = 0;
        this.fieldData.forEach(data => {
          if (data.selected) {
            cnt++;

          }
        })

        if (cnt >= 3 && !this.fieldData[index].selected) {
          util.toast('最多只能选3个擅长领域')
          return;
        }
        this.num = 0;
        this.fieldData[index].selected = !this.fieldData[index].selected;
        this.fieldData.forEach(data => {
          if (data.selected) {
            this.num++

          }
        })
        console.log(this.fieldData)
        this.$forceUpdate();

      },
      // 确认擅长领域
      fieldConfirm() {
        this.fieldLabel = "";
        this.fieldValue = "";
        this.fieldData.forEach(data => {
          if (data.selected) {
            this.fieldLabel += data.label + "/";
            this.fieldValue += data.value + ",";

          }
        })
        this.fieldLabel = this.fieldLabel.slice(0, -1)
        this.formData3.field = this.fieldValue;
        this.showMaskField();
      },
      // 成就
      showMaskAchieve() {
        this.showAchieveMask = !this.showAchieveMask;
        if (!this.showAchieveMask) {
          // this.$refs.popup_achieve.open('center');
        }
        console.log('444', this.achieveData)
      },
      // 选择成就类别
      addAchieveChecked(index) {
        this.achieveData[index].selected = !this.achieveData[index].selected;
        this.$forceUpdate();
      },
      // 成就类别
      achieveConfirm() {
        this.achieveLabel = "";
        this.achieveValue = "";
        this.achieveData.forEach(data => {
          if (data.selected) {
            this.achieveLabel += data.label + "/";
            this.achieveValue += data.value + ",";
          }
        })
        this.formData3.achieve = this.fieldValue;
        this.showMaskAchieve();
      },
      // 显示毕业院校表单
      addSchool() {
        this.showPopupSchool = true;
      },
      bindDateChange: function (e) {
        this.date = e.detail.value
      },
      getDate(type) {
        const date = new Date();
        let year = date.getFullYear();
        let month = date.getMonth() + 1;
        let day = date.getDate();

        if (type === 'start') {
          year = year - 60;
        } else if (type === 'end') {
          year = year + 2;
        }
        month = month > 9 ? month : '0' + month;
        day = day > 9 ? day : '0' + day;
        return `${year}-${month}-${day}`;
      },
      // 保存学校
      saveSchool() {
        this.showPopupSchool = false;
        this.$forceUpdate();
        this.schoolInfo = this.formSchool1.graduateSchool
        console.log('展示学校~~', this.formSchool1)
      },
      // 毕业照片
      selectFileEducation(chooseImageRes) {
        console.log('response~~~', chooseImageRes)
        const tempFilePaths = chooseImageRes.tempFilePaths;
        uni.uploadFile({
          url: process.env.VUE_APP_BASE_URL + '/stage-api/wechat/artistInfo/upload', //后端用于处理图片并返回图片地址的接口   
          filePath: tempFilePaths[0],
          name: 'file',

          success: res => {
            let data = JSON.parse(res.data) //返回的是字符串，需要转成对象格式  
            // data.data.fileName; data.data.url;
            this.formData3.educationImgs.push(
              {
                name: data.data.name,
                uuid: data.data.name,
                extname: "jpg",
                cloudPath: data.data.fileName,
                fileType: "image",
                url: data.data.url,
                // image: { "width": 580, "height": 773, "location": data.data.url },
                path: data.data.url, "progress": 0, "status": "ready"
              }
            );
          },
          fail: (err) => {
            console.log("err", err);
          }
        })
      },
      deleteFileEducation(e) {
        console.log(" e.tempFilePath:" + e.tempFile.name);
        // this.formData3.educationImgs.map((item, i) => {
        // 	if (item.name == e.tempFile.name) {
        // 		this.formData.educationImgs.splice(i, 1)
        // 	}
        // })
      },
      // 相关证书
      selectFileAchieve(chooseImageRes) {

        const tempFilePaths = chooseImageRes.tempFilePaths;
        uni.uploadFile({
          url: process.env.VUE_APP_BASE_URL + api.upload, //后端用于处理图片并返回图片地址的接口   
          filePath: tempFilePaths[0],
          name: 'file',

          success: res => {
            let data = JSON.parse(res.data) //返回的是字符串，需要转成对象格式  
            // data.data.fileName; data.data.url;
            this.formData4.achieveImgs.push(
			{
              name: data.data.name,
              uuid: data.data.name,
              extname: "jpg",
              cloudPath: data.data.imgPath,
              fileType: "image",
              url: data.data.imgUrl,
              // image: { "width": 580, "height": 773, "location": data.data.url },
              path: data.data.imgUrl, "progress": 0, "status": "ready",
			  }
            );
          },
          fail: (err) => {
            console.log("err", err);
          }
        })
      },
      deleteFileAchieve(e) {
        console.log(" e.tempFilePath:" + e.tempFile.name);
        // this.formData3.achieveImgs.map((item, i) => {
        // 	if (item.name == e.tempFile.name) {
        // 		this.formData.achieveImgs.splice(i, 1)
        // 	}
        // })
      },
      // 本人照片
      selectFilePhoto(chooseImageRes) {
        console.log('response~~~', this.formData3.photoImgs)
        const tempFilePaths = chooseImageRes.tempFilePaths;
        uni.uploadFile({
          url: process.env.VUE_APP_BASE_URL + '/stage-api/wechat/artistInfo/upload', //后端用于处理图片并返回图片地址的接口   
          filePath: tempFilePaths[0],
          name: 'file',

          success: res => {
            let data = JSON.parse(res.data) //返回的是字符串，需要转成对象格式  
            // data.data.fileName; data.data.url;
            console.log('photoImgs!!!!', this.formData3.photoImgs)
            this.formData3.photoImgs.push(
              {
                name: data.data.name,
                uuid: data.data.name,
                extname: "jpg",
                cloudPath: data.data.fileName,
                fileType: "image",
                url: data.data.url,
                // image: { "width": 580, "height": 773, "location": data.data.url },
                path: data.data.url, "progress": 0, "status": "ready"
              }
            );
            console.log('photoImgs~~~~', this.formData3.photoImgs)
          },
          fail: (err) => {
            console.log("err", err);
          }
        })
      },
      deleteFilePhoto(e) {
        console.log(" e.tempFilePath:" + e.tempFile.name);
        // this.formData3.photoImgs.map((item, i) => {
        // 	if (item.name == e.tempFile.name) {
        // 		this.formData.photoImgs.splice(i, 1)
        // 	}
        // })
      },
      // 提交
      nextStep() {
		/*
        console.log(JSON.parse(JSON.stringify(this.formData3)))
        let promises = [];
        this.hasError = false;
        for (let i = 1; i <= 3; i++) {
          const promise = this.validate(i)
          promises.push(promise)
        }
        Promise.all(promises).then(() => {
          console.log('全部结束~~~', this.hasError)
          if (this.hasError) {
            util.toast('必填项为空或填写有误~')
          } else {
            this.submit()
          }
        })
		*/
	   console.log("-->this.formData6.has_clean:"+ this.formData6.has_clean);
	   
	    if(this.formData1.legalIdCardPic.legalCrtBackImgFilePath=='' || this.formData1.legalIdCardPic.legalCrtFrontImgFilePath==''){
			util.toast('请上传身份证照片')
			return;
		}
		if(this.formData1.name==''){
			util.toast('请输入真实姓名')
			return;
		}
		if(this.formData1.birthday==''){
			util.toast('请输入出生日期')
			return;
		}
		if(this.formData1.nickname==''){
			util.toast('请输入展示昵称')
			return;
		}
		if(this.formData1.nickname==''){
			util.toast('请输入展示昵称')
			return;
		}
		if(this.formData1.phone==''){
			util.toast('请输入手机号码')
			return;
		}
		if(this.formData1.address==''){
			util.toast('请输入常住地址')
			return;
		}
		if(this.avatarSrc==''){
			util.toast('请上传常形象照')
			return;
		}
		if(this.formData2.job_desc==''){
			util.toast('请输入职业履历')
			return;
		}
		if(this.formData2.cook_age==''){
			util.toast('请输入厨龄')
			return;
		}
		if(this.formData3.guoqishijian==''){
			util.toast('请输入健康证过期时间')
			return;
		}
		if(this.formData3.healthSrc && this.formData3.healthSrc.length==0){
			util.toast('请上传健康证照片')
			return;
		}
		console.log("->this.formData4.achieveImgs.length:"+this.formData4.achieveImgs.length);
		if(this.formData4.achieveImgs && this.formData4.achieveImgs.length==0){
			util.toast('请上传执业资格证照片')
			return;
		}
		if(this.formData5.rongyumingcheng==''){
			util.toast('请输入荣誉名称')
			return;
		}
		if(this.formData6.has_cooker==''){
			util.toast('请选择能否提供配套用具')
			return;
		}
		if(this.formData7.cuisine_ids==''){
			util.toast('请选择菜系')
			return;
		}
		// 职业证
		let achieveImgs = [];
		this.formData4.achieveImgs.forEach(v=>{
			console.log("->v:"+JSON.stringify(v));
			achieveImgs.push(v.url);
		})
		// 职业信息
		let zyxx = [];
		this.formData8.images.forEach(v=>{
		 	console.log("->职业信息:"+JSON.stringify(v));
		 	zyxx.push(v.url);
		})
		
		let certificate_data1 = {
			jkz : {name:"", image: this.formData3.healthSrc},
			zyz : {name:"", image: achieveImgs} 
		}
		
		let cuisine_ids1 = this.formData7.cuisine_ids.replace(/,$/, "");
		
		
		let extend_data = {
			rongyumingcheng : this.formData5.rongyumingcheng, // 荣誉
			zhiyexinxi : zyxx, // 职业信息
			zigezheng : this.formData4.zigezheng, // 职业信息
			idcard_imgs1: this.formData1.legalIdCardPic.legalCrtBackImgFilePath, // 身份证
			idcard_imgs2: this.formData1.legalIdCardPic.legalCrtFrontImgFilePath, 
			guoqishijian: this.formData3.guoqishijian,
		}
		
		let formData ={
			idcard_imgs : [this.formData1.legalIdCardPic.legalCrtBackImgFilePath,this.formData1.legalIdCardPic.legalCrtFrontImgFilePath],
			name : this.formData1.name,
			birthday : this.formData1.birthday,
			nickname : this.formData1.nickname,
			sex : this.formData1.sex,
			phone : this.formData1.phone,
			address : this.formData1.address,
			image : this.formData1.avatar,
			job_status : this.formData2.job_status,
			job_desc : this.formData2.job_desc,
			cook_age : this.formData2.cook_age,
			guoqishijian : this.formData3.guoqishijian,
			certificate_data : JSON.stringify(certificate_data1),
			fee : this.formData6.fee,
			has_clean : this.formData6.has_clean,
			has_waiter : this.formData6.has_waiter,
			has_cooker : this.formData6.has_cooker,
			has_invoice : this.formData6.has_invoice,
			cuisine_ids : cuisine_ids1,
			extend_data : JSON.stringify(extend_data)
		}
		console.log("->formData:"+JSON.stringify(formData));
		
		util.request(api.cookAdd, formData
		  , 'POST', 'application/x-www-form-urlencoded').then(res => {
		    if (res.code == 200) {
				util.toast('入驻信息提交成功')
				setTimeout(() => {
				  uni.navigateTo({
				    url: `/page_cookSide/cookSide`,
				  })
				}, 1000)
		    } 
		  }).catch((err) => {
		    console.log('err', err)
		    reject(err);
		  });
      },
      // 验证表单
      async validate(i) {
		  console.log("---->i:"+i);
        await this.$refs[`form${i}`].validate()
          .then((res) => {
            console.log("表单数据信息：", res);
          })
          .catch((err) => {
            this.hasError = true;

            console.log(`formData${i}`, this.hasError)
            console.log("表单错误信息：", err);
          });
      },
      // 提交表单
      submit() {
        let _data1 = JSON.parse(JSON.stringify(this.formData1));
        let _data2 = JSON.parse(JSON.stringify(this.formData2));
        let _data3 = JSON.parse(JSON.stringify(this.formData3));
        let _data4 = JSON.parse(JSON.stringify(this.formSchool1));
        // let _data5 = JSON.parse(JSON.stringify(this.formSchool2));

        // console.log('提交~~', { ..._data1, ..._data2, ..._data3, ..._data4, ..._data5 })
        console.log('提交~~', { ..._data1, ..._data2, ..._data3, ..._data4 })

        util.request(api.saveArtistInfo, {
          ..._data1, ..._data2, ..._data3, ..._data4

        }, 'POST', 'application/json').then(res => {
          console.log('保存艺术家信息', res)
          if (res.code == 200) {
            util.toast('艺术家信息提交成功')
            app.globalData.artistState = 0
            setTimeout(() => {
              uni.switchTab({
                url: '/pages/myInfo/myInfo',
              })
            }, 1000)



          } else {
            util.toast('提交失败，' + `${res.msg}`)
          }
        }).catch((err) => {
          console.log('err', err)
        });
      },
	  // 菜系
	  getCuisineList() {
	    let params = { page: 1, limit: 1000 };
	    util.request(api.cuisineList, params
	      , 'GET', 'application/json').then(res => {
	        if (res.code == 200) {
	          this.cuisineList = res.data.data;
			  this.init();
	        }
	  
	      }).catch((err) => {
	        console.log('err', err)
	  
	      });
	  },
	  // 初始化
	  init(){
		  if(app.globalData.user.cook_info){
			  let cookInfo = app.globalData.user.cook_info;
			  this.formData1.name = cookInfo.name ;
			  this.formData1.birthday = cookInfo.birthday ;
			  this.formData1.nickname = cookInfo.nickname ;
			  this.formData1.sex = cookInfo.sex ;
			  this.formData1.phone = cookInfo.phone ;
			  this.formData1.address = cookInfo.address ;
			  this.formData1.avatar = cookInfo.image ;
			  this.formData2.job_status = cookInfo.job_status ;
			  this.formData2.job_desc = cookInfo.job_desc ;
			  this.formData2.cook_age = cookInfo.cook_age ;
			  this.formData3.guoqishijian = cookInfo.guoqishijian ;
			  this.formData6.fee = cookInfo.fee ;
			  this.formData6.has_clean = cookInfo.has_clean ;
			  this.formData6.has_waiter = cookInfo.has_waiter ;
			  this.formData6.has_cooker = cookInfo.has_cooker ;
			  this.formData6.has_invoice = cookInfo.has_invoice ;
			  
			  let certificate_data = JSON.parse(cookInfo.certificate_data);
			  // 职业证
			  if(certificate_data.zyz){
				  certificate_data.zyz.image.forEach(v=>{
					   this.formData4.achieveImgs.push(
						{
							name: v,
							uuid: v,
							extname: "jpg",
							cloudPath: v,
							fileType: "image",
							url: v,
							// image: { "width": 580, "height": 773, "location": data.data.url },
							path: v, "progress": 0, "status": "ready",
						});
				  })
			  }
			  
			  let extend_data =  JSON.parse(cookInfo.extend_data);
			  
			  this.formData1.legalIdCardPic.legalCrtBackImgFilePath = extend_data.idcard_imgs1;
			  this.formData1.legalIdCardPic.legalCrtFrontImgFilePath= extend_data.idcard_imgs2; 
			  

			  this.formData7.cuisine_ids = cookInfo.cuisine_ids;
			  
			  this.formData5.rongyumingcheng = extend_data.rongyumingcheng;
			  //this.formData8.images = extend_data.zhiyexinxi;
			  this.formData4.zigezheng = extend_data.zigezheng;
			  
			  // 职业信息
			  extend_data.zhiyexinxi.forEach(v=>{
			  		this.formData8.images.push(
			  		{
			  			name: v,
			  			uuid: v,
			  			extname: "jpg",
			  			cloudPath: v,
			  			fileType: "image",
			  			url: v,
			  			// image: { "width": 580, "height": 773, "location": data.data.url },
			  			path: v, "progress": 0, "status": "ready",
			  		});
			  })
			  
			  console.log("===> cookInfo.image:"+ cookInfo.image);
			  this.avatarSrc = cookInfo.image;
			  
			  
			  this.legalImgSrcF = extend_data.idcard_imgs1;
			  this.legalImgSrcB = extend_data.idcard_imgs2;
			  
			  this.healthSrc = certificate_data.jkz.image;
			  this.formData3.healthSrc = certificate_data.jkz.image;
			  
			  this.formData3.guoqishijian = extend_data.guoqishijian;
			  
		  }
	  }
    },
    onLoad: function (option) {
      this.imgDomain = process.env.VUE_APP_BASE_URL;
      // this.getData();
      // this.getArtistInfo()
	  this.getCuisineList();
    },
    onReady() {
      // 需要在onReady中设置规则
      // this.$refs.form1.setRules(this.rules1);
      // this.$refs.form2.setRules(this.rules2);
      // this.$refs.form3.setRules(this.rules3);
    },
    created() {
      //获取手机系统信息
      const info = uni.getSystemInfoSync();
      this.maskHeight = info.screenHeight;

      //设置状态栏高度
      const statusBarHeight = info.statusBarHeight;

      const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
      // (胶囊底部高度 - 状态栏的高度) + (胶囊顶部高度 - 状态栏内的高度) = 导航栏的高度
      let navBarHeight = (menuButtonInfo.bottom - info.statusBarHeight) + (menuButtonInfo.top - info.statusBarHeight)
      this.maskTop = statusBarHeight + navBarHeight;

    }
  }
</script>

<style lang="scss" scoped>
  .myInfoContainer {
    box-sizing: border-box;
  }

  .infoType {
    align-items: center;
    display: flex;
    justify-content: space-around;
    height: 114rpx;
    background-color: #FFFFFF;
    width: 750rpx;
    /* height: 256rpx; */
    background: #FFFFFF;
    box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(0, 0, 0, 0.16);
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin-bottom: 20rpx;

    .type {
      text-align: center;
      font-weight: 500;
      font-size: 28rpx;
      color: rgba(51, 51, 51, 0.6);
      width: 168rpx;
      height: 66rpx;
      line-height: 66rpx;
      border-radius: 20rpx 20rpx 20rpx 20rpx;
    }

    .selected {
      font-weight: 500;
      font-size: 28rpx;
      color: #333333;
      background: #FECF01;

    }

  }

  .infoBox {
    position: relative;

    .content {
      padding: 0rpx 32rpx;
    }

    .content1 {
      .part1 {
        padding: 0rpx 30rpx;
        width: 750rpx;
        height: 410rpx;
        background: #FFFFFF;
        box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.1);
        border-radius: 20rpx 20rpx 20rpx 20rpx;

        .title {
          height: 108rpx;
          line-height: 108rpx;
          font-weight: 500;
          font-size: 32rpx;
          color: #333333;
          border-bottom: 2rpx solid rgba(51, 51, 51, 0.1);
          margin-bottom: 30rpx;
        }
      }

      .part2 {
        width: 750rpx;
        padding: 0rpx 30rpx;
        background: #FFFFFF;
        box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.1);
        border-radius: 20rpx 20rpx 20rpx 20rpx;
        margin-top: 20rpx;


        .avatarBox {
          display: flex;

          .uploadAvatar {
            .avatar {
              width: 134rpx;
            }

          }

          .example {
            margin-left: 66rpx;

            image {
              width: 134rpx;
            }

            .title {
              padding: 0 0 8px;
              line-height: 1.5715;
              height: 36px;
              font-weight: 400;
              font-size: 28rpx;
              color: rgba(51, 51, 51, 0.8);
            }
          }
        }

      }
    }

    .content2 {

      .part1,
      .part2,
      .part3,
      .part4 {
        width: 750rpx;
        margin-top: 20rpx;
        background: #FFFFFF;
        box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.1);
        border-radius: 20rpx 20rpx 20rpx 20rpx;
        padding: 42rpx 30rpx;

        .title {
          margin-bottom: 40rpx;
          font-weight: 500;
          font-size: 32rpx;
          color: #333333;
        }
      }

      .healthBox {
        .health {
          width: 134rpx;
        }
      }
    }

    .content3 , .content4{
      .part1,    .part2 {
        padding: 20rpx 30rpx;
        width: 750rpx;

        background: #FFFFFF;
        box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.1);
        border-radius: 20rpx 20rpx 20rpx 20rpx;

        .title {
          height: 108rpx;
          line-height: 108rpx;
          font-weight: 500;
          font-size: 32rpx;
          color: #333333;
          border-bottom: 2rpx solid rgba(51, 51, 51, 0.1);
          margin-bottom: 30rpx;
        }
      }


    }
    
    .content4{
      .caixiLabel{
        margin-right: 40rpx;
        white-space: nowrap;
        checkbox{
          margin-right: 18rpx;
        }
      }
    }




    .uploadPlus {
      width: 100%;
      height: 240rpx;
      background: #FBF8F6;
      border-radius: 10rpx;

      image {
        width: 230rpx;
        height: 150rpx;
        position: absolute;
        top: 30rpx;
        left: 30rpx;
      }

      text {
        font-size: 20rpx;
        color: #999999;
        right: 20rpx;
        bottom: 20rpx;
        position: absolute;
      }

    }

    .legalIdBox {
      width: 100%;
      display: flex;
      justify-content: space-around;
      position: relative;

      .limit {
        position: absolute;
        right: 5rpx;
        bottom: 0rpx;
        font-size: 20rpx;
        color: #999999;
      }

      .uploadView {
        width: 280rpx;
        height: 200rpx;


        display: flex;
        flex-direction: column;
        align-items: center;

        image {
          width: 280rpx;
          height: 200rpx;

        }

      }
    }





    .nextStep {
      width: 644rpx;
      height: 98rpx;
      background: #FECF01;
      border-radius: 20rpx 20rpx 20rpx 20rpx;
      font-weight: 600;
      font-size: 32rpx;
      color: #333333;
      line-height: 98rpx;

      margin-top: 102rpx;
    }

    .bottomTxt {
      font-size: 10rpx;
      color: #CCCCCC;
      // margin-top:95px;
      // margin-bottom:20px;
      width: 100%;
      text-align: center;
      height: 250rpx;
      line-height: 50rpx;
    }
  }

  .zhanwei {
    width: 750rpx;
    height: 60rpx;
  }

  /deep/.uni-easyinput__content input {
    /* text-align: right !important; */
    padding-right: 10px;
  }

  /deep/ .is-input-border {
    border: 2rpx solid rgba(0, 0, 0, 0.1);
  }

  /* /deep/ .uni-forms-item {
    border-bottom: 1rpx solid #DEDEDE !important;

    margin-bottom: 0px !important;
    padding-bottom: 15px !important;
    padding-top: 15px !important;
  } */

  /deep/ .uni-select {
    /* text-align: right; */
    padding-right: 10px;
  }

  /deep/ .uni-select__selector-item text {
    text-align: center !important;
    width: 100%;
  }

  /deep/ .uni-forms-item__label {
    text {
      font-weight: 500;
      font-size: 28rpx;
      color: #333333;
      opacity: 0.8;
    }

    .is-required {
      color: #DE2D27;
    }


  }

  .is-direction-left:nth-child(4) {
    overflow: hidden !important;
  }

  .is-direction-left:nth-child(5) {
    overflow: hidden !important;
  }



  .data-pickerview {
    height: 400px;
    border: 1px #e5e5e5 solid;
  }

  .popper__arrow {
    top: -6px;
    left: 50%;
    margin-right: 3px;
    border-top-width: 0;
    border-bottom-color: #EBEEF5;
  }

  .popper__arrow {
    top: -6px;
    left: 50%;
    margin-right: 3px;
    border-top-width: 0;
    border-bottom-color: #EBEEF5;
  }



  .uni-forms-item__content {
    .uni-easyinput {
      font-size: 28rpx;
      font-family: SourceHanSerifCN-Regular, SourceHanSerifCN;
      font-weight: 400;
      color: #7A605E;
    }
  }

  ::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    color: transparent;
  }

  .uni-easyinput__content-textarea {
    min-height: 20px !important;
    height: 40px !important;
  }

  /deep/ .uni-forms-item:last-child {
    border-bottom: none !important;

  }

  .chooseBox {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #C1C1C1;
  }

  .fieldMask {
    position: fixed;
    top: 0rpx;
    left: 0rpx;
    z-index: 999;
    width: 100%;
    display: flex;
    flex-direction: column;

    .topArea {
      width: 100%;
      display: flex;

      .right {
        width: 100%;
        height: 100%;
        background: #FFFFFF;
        border: 1rpx solid #EEEEEE;
        position: relative;

        .selectAll {
          width: 100%;
          height: 98rpx;
          background: #FFFFFF;
          text-align: right;
          line-height: 98rpx;

          .checkbox {
            height: 100%;
            font-size: 30rpx;
            font-family: SourceHanSerifCN-Medium, SourceHanSerifCN;
            font-weight: 500;
            color: #300E12;
            margin-right: 27rpx;

            .clickBox {
              height: 100%;
              display: flex;
              align-items: center;
              justify-content: flex-end;
            }

            .radio {
              width: 27rpx;
              height: 27rpx;
              background: #ccc;
              margin-right: 10rpx;
            }

            .checkedAll {
              background: #84240E
            }
          }
        }

        .type2Box {
          .showNum {
            font-size: 32rpx;
            font-family: PingFangSC, PingFang SC;
            font-weight: 600;
            color: #333333;
            margin: 50rpx;
          }



          .type2 {
            width: 100%;
            height: 100rpx;
            background: #FFFFFF;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0rpx 54rpx 0rpx 50rpx;
            font-size: 32rpx;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            color: #333333;

            image {
              width: 60rpx;
              height: 60rpx;
            }
          }

          .selected {
            background: #FBF8F6;
          }
        }

        .confirmBtnBox {
          width: 100%;
          display: flex;
          justify-content: center;
          margin-top: 100rpx;
        }

        .confirmBtn {
          font-size: 34rpx;
          font-family: PingFangSC, PingFang SC;
          font-weight: 600;
          color: #FFFFFF;
          line-height: 100rpx;
          letter-spacing: 2px;
          text-align: center;
          width: 690rpx;
          height: 100rpx;
          background: #20B7B2;
          border-radius: 50rpx;
        }
      }

      .right1 {
        padding: 0rpx 30rpx;

        .date-input {
          height: 36px;
          text-align: right;
          line-height: 36px;
        }
      }

    }

    .whiteSpace {
      width: 100%;
      flex: 1;
      background: #333333;
      opacity: 0.5;
    }
  }

  .popupSchool {
    .topBg {
      display: flex;
      justify-content: center;
      width: 100%;
      background: white;
      height: 100%;
    }



    .saveBox {
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-top: 110rpx;

      view {
        width: 620rpx;
        height: 88rpx;
        background: #84240E;
        border-radius: 10rpx;
        border: 1rpx solid #84240E;
        text-align: center;
        font-size: 36rpx;
        font-family: SourceHanSerifCN-Heavy, SourceHanSerifCN;
        font-weight: 800;
        color: #FAF3DB;
        line-height: 88rpx;
        letter-spacing: 6rpx;
      }
    }

  }

  .image-body {}

  .image-box {

    display: flex;

    flex-direction: column;
    padding: 42rpx 0rpx 50rpx;
    border-bottom: 1rpx solid #DEDEDE;

  }

  .image-text {
    font-size: 28rpx;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #333333;
    display: flex;
    align-items: center;

    .redStar {
      font-family: PingFangSC-Regular, PingFang SC;
      color: #dd524d;
      font-weight: bold;
      font-size: 28rpx;
    }

    .gray {
      font-size: 22rpx;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #999999;
      margin-left: 14rpx;
    }
  }

  .uni-file-picker {
    margin-top: 12px;
    margin-left: 12px;
  }

  /deep/.uni-easyinput__content input {
    /* text-align: right !important; */
    padding-right: 10px;
    font-size: 28rpx;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;

  }

  .example-body {
    background-color: #fff;
    padding: 10px;
  }

  /deep/ .uni-list-cell-pd {
    display: flex;
    margin-right: 68rpx;
    align-items: center;
  }

  /deep/ .uni-list-cell-pd-1 {
    display: flex;
    margin-right: 54rpx;
    align-items: center;
  }

  /deep/ radio-group {
    display: flex;
  }
</style>